#include<iostream>
#include<iomanip>
#include<string.h>
#include<cmath>
#include<stdio.h>
using namespace std;

int f(int x)
{
    if(x==1) return 1;
    else if(x==2) return 10;
    else if(x==3)  return  100; 
}
int main()
{
    bool flag;char s[1000] ; int n; 
    while(cin>>n){
      flag=true;
      cin>>s;
      for(int i=strlen(s)-1;i>=0;i--){
         int j=1,sum=0;
         while(s[i]!='.'){
            sum+=(s[i]-'0')*f(j);
            cout<<sum<<endl;
            j++;
            i--;
         }//while 
         j=1,sum=0;
         while(i>=0){
            sum+=(s[i]-'0')*f(j);
            cout<<sum<<endl;
            j++;
            i--;
         }//while 
      if(sum<0||sum>255) {flag=false;break;}
      }//for
      if(flag)  cout<<"Yes!"<<endl;
      else  cout<<"No!"<<endl;
    }
    system("pause"); 
    return 0;
}
